package com.example.leetcode.graph;

import com.example.leetcode.graph.common.GraphUtils;

class Solution695 {
    public int maxAreaOfIsland(int[][] grid) {
        return GraphUtils.maxAreaOfIsland(grid);
    }
}

public class leetcode695 {
    public static void main(String[] args) {
        Solution695 solution695 = new Solution695();
        int[][] grid = {
                {0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
                {0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0},
                {0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0},
                {0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0},
                {0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0},
                {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
                {0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0},
                {0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0}
        };
        System.out.println(solution695.maxAreaOfIsland(grid));

        int[][] grid1 = {
                {0, 0, 0, 0, 0, 0, 0, 0}
        };
        System.out.println(solution695.maxAreaOfIsland(grid1));
    }
}
